<!-- 侧边菜单 -->
<div class="layui-side layui-side-menu">
    <div class="layui-side-scroll">
        <div class="layui-logo">
            <span style="font-weight:bold"><?= WEB_NAME ?></span>
        </div>
        <ul class="layui-nav layui-nav-tree" lay-shrink="all" id="LAY-system-side-menu" lay-filter="layadmin-system-side-menu">
            <li data-name="home" class="layui-nav-item layui-this">
                <a lay-href="<?= $mainUrl ?>&" lay-tips="主页" lay-direction="2">
                    <i class="layui-icon layui-icon-home"></i>
                    <cite>主页</cite>
                </a>
            </li>
            <?php
            foreach ($menu_data_tmp[0] as $k => $v) {
                if (strrpos($this->_adminInfo["menu"], "|" . $v["id"] . "|") !== false || $this->_adminInfo["role_id"] == -1) {
                    ?>
                    <li data-name="set" class="layui-nav-item">
                        <a <?= $v["url"] ? "lay-href='" . MANAGE_URL . "&" . $v["url"] . "'" : "href='javascript:;'" ?> lay-tips="<?= $v["title"] ?>" lay-direction="2">
                            <i class="layui-icon<?= $v["class_name"] ? " " . $v["class_name"] : " layui-icon-component" ?>"></i>
                            <cite><?= $v["title"] ?></cite>
                        </a>
                        <?php
                        if (isset($menu_data_tmp[$k])) {
                            ?>
                            <dl class="layui-nav-child">
                                <?php
                                foreach ($menu_data_tmp[$k] as $k2 => $v2) {
                                    if (strrpos($this->_adminInfo["menu"], "|" . $v2["id"] . "|") !== false || $this->_adminInfo["role_id"] == -1) {
                                        ?>
                                        <dd class="layui-nav-itemed">
                                            <a <?= $v2["url"] ? "lay-href='" . MANAGE_URL . "&" . $v2["url"] . "'" : "href='javascript:;'" ?>><?= $v2["title"] ?></a>
                                            <?php if (isset($menu_data_tmp[$k2])) {
                                                ?>
                                                <dl class="layui-nav-child">
                                                    <?php
                                                    foreach ($menu_data_tmp[$k2] as $k3 => $v3) {
                                                        if (strrpos($this->_adminInfo["menu"], "|" . $v3["id"] . "|") !== false || $this->_adminInfo["role_id"] == -1) {
                                                            ?>
                                                            <dd><a lay-href="<?= $v3["url"] ? MANAGE_URL . "&" . $v3["url"] : "javascript:;" ?>"><?= $v3["title"] ?></a></dd>
                                                            <?php
                                                        }
                                                    }
                                                    ?>
                                                </dl>
                                            <?php } ?>
                                        </dd>
                                        <?php
                                    }
                                }
                                ?>
                            </dl>
                        <?php }
                        ?>
                    </li>
                    <?php
                }
            }
            ?>
        </ul>
    </div>
</div>